package com.gxa.accommodation.mapper;


import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.gxa.accommodation.dto.SelectRoomByRoomTypeDTO;
import com.gxa.accommodation.entity.AccommodationRoom;
import com.gxa.accommodation.vo.AccommodationRoomVO;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;


@Repository
public interface AccommodationRoomMapper extends BaseMapper<AccommodationRoom> {

    /**
     * @param page
     * @return
     */
    Page<AccommodationRoomVO> selectByPage(@Param("page") Page<AccommodationRoomVO> page);

    Page<SelectRoomByRoomTypeDTO> selectListByOrderNum(@Param("dto") SelectRoomByRoomTypeDTO dto, @Param("page") Page<SelectRoomByRoomTypeDTO> page);

    void arrangeRoomByOrder(@Param("roomId") Long roomId);

    void outRoomByOrder(@Param("roomId") Long roomId);

    void updataOrderStatusCheckById(@Param("order_num")Long order_num,
                                    @Param("room_id") Long room_id);

    void updataOrderStatusOutMoneyById(@Param("order_status") Byte order_status,
                                       @Param("order_num") Long order_num);
}
